package com.xiaoye.qbproject.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 专题文章
 *
 * @TableName QB_SUBJECT_ARTICLE
 */
@TableName(value = "QB_SUBJECT_ARTICLE")
@Data
public class QbSubjectArticle implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "ID")
    private String id;

    /**
     * 标题
     */
    @TableField(value = "TITLE")
    private String title;

    /**
     * 关键词
     */
    @TableField(value = "KEYWORDS")
    private String keywords;

    /**
     * 来源
     */
    @TableField(value = "SOURCE")
    private String source;

    /**
     * 发布时间
     */
    @TableField(value = "RELEASE_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date releaseTime;

    /**
     * 简介
     */
    @TableField(value = "INTRO")
    private String intro;

    /**
     * 内容
     */
    @TableField(value = "CONTENT")
    private String content;

    /**
     * 创建时间
     */
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 封面
     */
    @TableField(value = "COVER")
    private String cover;

    /**
     * 备注
     */
    @TableField(value = "REMARK")
    private String remark;

    /**
     * 专题id
     */
    @TableField(value = "SUBJECT_ID")
    private String subjectId;

    /**
     * 是否发布
     */
    @TableField(value = "IS_PUBLISH")
    private Boolean isPublish;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", title=").append(title);
        sb.append(", keywords=").append(keywords);
        sb.append(", source=").append(source);
        sb.append(", releaseTime=").append(releaseTime);
        sb.append(", intro=").append(intro);
        sb.append(", content=").append(content);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", cover=").append(cover);
        sb.append(", remark=").append(remark);
        sb.append(", subjectId=").append(subjectId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}